/*
 * 类名称:ShopService.java
 * 包名称:com.unimall.graded.app.api.shop
 *
 * 修改履历:
 *     日期                       修正者        主要内容
 *     2020-03-17 09:48:29        lin     初版做成
 *
 * Copyright (c) 2019-2019 浵浵科技
 */
package com.unimall.graded.app.api.shop;

import com.iotechn.unimall.core.annotation.HttpMethod;
import com.iotechn.unimall.core.annotation.HttpOpenApi;
import com.iotechn.unimall.core.annotation.HttpParam;
import com.iotechn.unimall.core.annotation.HttpParamType;
import com.iotechn.unimall.core.annotation.param.NotNull;
import com.iotechn.unimall.core.annotation.param.Range;
import com.iotechn.unimall.core.exception.ServiceException;
import com.unimall.graded.data.domain.ShopDO;
import com.iotechn.unimall.data.model.Page;

import java.util.List;
import java.util.Map;

/**
 * 分销用户商铺Service接口
 *
 * @author lin
 * @date 2020-03-17 09:48:29
 */

@HttpOpenApi(group = "graded.app.shop", description = "分销用户商铺")
public interface ShopService {

    @HttpMethod(description = "创建分销用户商铺")
    public Integer addShop(
            @NotNull @HttpParam(name = "shopDO", type = HttpParamType.COMMON, description = "分销用户商铺信息") ShopDO shopDO) throws ServiceException;


    @HttpMethod(description = "删除分销用户商铺")
    public Boolean deleteShop(
            @HttpParam(name = "userId", type = HttpParamType.USER_ID, description = "用户Id") Long userId,
            @NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "分销用户商铺Id") Long id) throws ServiceException;


    @HttpMethod(description = "修改分销用户商铺")
    public Boolean updateShop(
            @HttpParam(name = "userId", type = HttpParamType.USER_ID, description = "用户Id") Long userId,
            @NotNull @HttpParam(name = "shopDO", type = HttpParamType.COMMON, description = "分销用户商铺信息") ShopDO shopDO) throws ServiceException;


    @HttpMethod(description = "详情分销用户商铺")
    public ShopDO getShopById(
            @HttpParam(name = "userId", type = HttpParamType.USER_ID, description = "用户Id") Long userId,
            @NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "分销用户商铺Id") Long id) throws ServiceException;
    /**
     * 分页查询
     */
    @HttpMethod(description = "查询分销用户商铺")
    public List<ShopDO> getShopList(
                      @HttpParam(name = "id", type = HttpParamType.COMMON, description = "") Long id,
                                                      @HttpParam(name = "shopName", type = HttpParamType.COMMON, description = "商铺名称") String shopName,
                                  @HttpParam(name = "phone", type = HttpParamType.COMMON, description = "联系电话") String phone,
                                                                                                                                                                                            @NotNull @HttpParam(name = "userId", type = HttpParamType.USER_ID, description = "用户Id") Long userId
              ) throws ServiceException;



    /**
     * 分页查询
     */
    @HttpMethod(description = "查询分销用户商铺")
    public Page<ShopDO> getShopListWithPage(
            @NotNull @HttpParam(name = "userId", type = HttpParamType.USER_ID, description = "用户Id") Long userId,
                                @HttpParam(name = "id", type = HttpParamType.COMMON, description = "") Long id,
                                                        @HttpParam(name = "shopName", type = HttpParamType.COMMON, description = "商铺名称") String shopName,
                                        @HttpParam(name = "phone", type = HttpParamType.COMMON, description = "联系电话") String phone,
                        @HttpParam(name = "pageNo", type = HttpParamType.COMMON, description = "当前页码") Integer pageNo,
        @HttpParam(name = "limit", type = HttpParamType.COMMON, description = "页码长度") Integer limit) throws ServiceException;

}
